#ifndef __MY_WINDOWS_INTERFACE
#define __MY_WINDOWS_INTERFACE

#define MVWF_HAS_CONFIG   0x00000001UL
#define MVWF_HAS_RESIZE   0x00000002UL
#define MVWF_HAS_PAN      0x00000004UL

LOCALSTRUCT( MVWindowInfo )
  PTForm        Form;
  PTControl     Control;
  HANDLE        UserHandle;
  PathString    Name;
  DWORD         Id;

  virtual DWORD     GetType( void ) = 0;
  virtual CONSTSTR  GetCaption( void ) = 0;
  virtual PTForm    CreateForm( void ) = 0;

  virtual void      OnConfigure( void ) = 0;

  /*
    OnCloseQuery - before close
    OnClose      - on close
    OnShow       - cfg -> fields
    OnHide       - fields -> cfg
  */
};

  void               RTS_DECLSPEC (__closure *RegisterWindow)( RTWType type, PTForm frm, CONSTSTR nm, DWORD id );
  PTForm             RTS_DECLSPEC (__closure *LocateWindowByName)( CONSTSTR nm );
  PTForm             RTS_DECLSPEC (__closure *LocateWindowById)( DWORD id );
  void               RTS_DECLSPEC (__closure *UnregisterWindow)( PTForm frm );
  PHConfigItem       RTS_DECLSPEC (__closure *GetWindowCfg)( PTForm frm );

#endif